<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /* const a = "name";
      const obj = {
        ["user" + a]: "jack", // username:'jack'
      }; */

      const a = "say";
      const b = "Hi";
      function fname() {
        return a + b;
      }
      class Person {
        [fname()]() {}
        // [a + b]() {}
        // sayHi() {}
      }
      const p1 = new Person();
      p1[fname()]();
      // p1.sayHi();
      console.log(p1);
    </script>
  </body>
</html>
